package com.xh.jf_blog.common.sensitive;

public class Main {
    public static void main(String[] args) throws Exception {
        SensitiveWordFilter.loadWordFromFile("D:\\记录\\OneDrive\\学校资料\\徐海学院\\2023-2024-1\\javaWeb大实训\\20级实训\\考研批\\最终项目\\项目代码\\jf_blog\\src\\main\\resources\\sensitive\\sensitive-word-list.txt");
        StringBuilder stringBuilder = new StringBuilder();
        long t1, t2;
        for (int i = 0; i < 100; i++) {
            stringBuilder.append("今天徐,强打算骂人，然后去玩游戏");
        }
        String s = stringBuilder.toString();
        String result = null;
        t1 = System.nanoTime();
        for (int i = 0; i < 10000; i++) {
            result = SensitiveWordFilter.Filter(s);
        }
        t2 = System.nanoTime();
        System.out.println(result);
        System.out.println((t2 - t1) / 1000000 + "毫秒");
    }
}
